<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css">
body{
	font-size: 12px;
}
</style>
<script type="text/javascript">
//var size=$area(obj);
var menudata=[
	{id:1,url:"",text:"系统管理",pid:0},
	{id:2,url:"page-01.jsp",text:"系统信息配置",pid:1},
	{id:3,url:"page-01.jsp",text:"密码修改",pid:1},
	{id:4,url:"page-01.jsp",text:"帐号管理",pid:1},
	{id:5,url:"page-01.jsp",text:"录入帐号",pid:4},
	{id:6,url:"",text:"新闻管理",pid:0},
	{id:7,url:"page-01.jsp",text:"新闻列表",pid:6},
	{id:8,url:"page-01.jsp",text:"录入新闻",pid:6},
	{id:9,url:"",text:"信息反馈管理",pid:0},
	{id:10,url:"page-01.jsp",text:"反馈列表",pid:9},
	{id:11,url:"page-01.jsp",text:"信息反馈",pid:9},
	{id:12,url:"page-01.jsp",text:"注销",pid:1},
	{id:13,url:"page-01.jsp",text:"删除新闻",pid:6},
	{id:14,url:"page-01.jsp",text:"编辑帐号",pid:4},
	{id:15,url:"page-01.jsp",text:"信息统计",pid:4}
];
function initMenu(){
	createMenu(0,0);
}

function createMenu(pid,step){
	for(var i=0;i<menudata.length;i++){
		var menuItem=menudata[i];
		if(menuItem.pid==pid){
			createMenuItem(menuItem,step);
			createMenu(menuItem.id,step+1);
		}
	}
}
function createMenuItem(itemInfo,step){
	var div=document.createElement("div");
	if(!itemInfo.url){
		div.innerHTML=createSpace(step)+"<input type='checkbox'/>"+"<b>"+ itemInfo.text +"</b>";
	}
	else{
		div.innerHTML=createSpace(step)+"<input type='checkbox'/>"+"<a href=\""+ itemInfo.url +"\">"+itemInfo.text+"</a>";
	}
	document.getElementById("menuContainer").appendChild(div);
}
function createSpace(step){
	var space="";
	for(var i=0;i<step;i++){
		space+="&nbsp;&nbsp;&nbsp;&nbsp;";
	}
	return space;
}
window.onload=function(){
	initMenu();
};
</script>
</head>
<body>
<div id="menuContainer"></div>
</body>
</html>